<?php	$this->load->view('includes/header');	?>
<div class="container">
    <div class="row">
								<div class="col-md-9">
												<h1>Panel de Control <small>Añadir Peliculas</small></h1>
												<hr>
												<?php	if	(isset($error)	&&	$error):	?>
																<div class="alert alert-info alert-dismissable">
																				<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
																				<?php
																				echo	validation_errors();
																				if	(isset($msg)	&&	$msg	!=	' ')	{
																								echo	$msg;
																				}
																				?>
																</div>
												<?php	endif	?>
												<div class="row">
																<form role="form" class="form_add" id="form_add_cine" action="<?php echo base_url(); ?>/index.php/peliculas/insert/<?php	echo	$cod_pelicula;	?>" method="post">
																				<div class="form-group col-md-3">
																								<label>CODIGO</label>
																								<input class="form-control" name="cod_pelicula" value="<?php	echo	$cod_pelicula;	?>"> 
																				</div>
																				<div class="form-group col-md-9">
																								<label>TITULO</label>
																								<input type="text" class="form-control input_width10" name="titulo_dist" value="<?php	echo	$titulo_dist;	?>"> 
																				</div>
																				<div class="form-group col-md-9">
																								<label>TITULO ORIGINAL</label>
																								<input class="form-control" name="titulo_org" value="<?php	echo	$titulo_org;	?>"> 
																				</div>
																				<div class="form-group col-md-2 col-md-offset-1">
																								<label>AÑO</label>
																								<input class="form-control" name="anyo" value="<?php	echo	$anyo;	?>"> 
																				</div>
																				<div class="form-group col-md-6">
																								<label>IDIOMA</label>
																								<select class="form-control" name="cod_idioma">
																												<?php	foreach	($idiomas	as	$each):	?>
																																<option value="<?php	echo	$each['cod_idiomas']	?>"<?php
																																if	($each['cod_idiomas']	==	$cod_idioma)	{
																																				echo	'selected';
																																}
																																?>><?php	echo	$each['nombre']	?></option>
																												<?php	endforeach	?>
																								</select>
																				</div>
																				<div class="form-group col-md-1">
																								<label>VOSE</label>
																								<input type="checkbox" class="form-control" name="VOSE" <?php
																								if	($VOSE	==	1)	{
																												echo	'checked';
																								}
																								?>> 
																				</div>
																				<div class="form-group col-md-2 col-md-offset-1">
																								<label> T. Horas</label>
																								<input class="form-control" name="h_duracion" value="<?php	echo	$h_duracion;	?>"> 
																				</div>
																				<div class="form-group col-md-2">
																								<label>T. Minutos</label>
																								<input class="form-control" name="m_duracion" value="<?php	echo	$m_duracion;	?>"> 
																				</div>
																</div>
																<div class="row">
																				<div class="form-group col-md-9">
																								<label>WEB PRODUCTORA</label>
																								<input class="form-control" name="url_web" value="<?php	echo	$url_web;	?>"> 
																				</div>
																				<div class="form-group col-md-3">
																								<label>FECHA de ESTRENO</label>
																								<input type="date" class="form-control" name="f_estreno" value="<?php	echo	$f_estreno;	?>"> 
																				</div>
																				<div class="form-group col-md-9">
																								<label>ENLACE IMDB</label>
																								<input class="form-control" name="url_imdb" value="<?php	echo	$url_imdb;	?>"> 
																				</div>
																				<div class="form-group col-md-1 col-md-offset-1">
																								<label>PUNTOS</label>
																								<input class="form-control" name="puntuacion" value="<?php	echo	$puntuacion;	?>"> 
																				</div>
																</div>
																<div class="row">
																				<div class="form-group col-md-6">
																								<label>CALIFICACION</label>
																								<select class="form-control" name="cod_calificacion">
																																				<?php	foreach	($calificaciones	as	$each):	?>
																																<option value="<?php	echo	$each['cod_calificacion']	?>"<?php
																																				if	($each['cod_calificacion']	==	$cod_calificacion)	{
																																								echo	'selected';
																																				}
																																				?>><?php	echo	$each['nombre']	?></option>
																												<?php	endforeach	?>
																								</select>
																				</div>
																				<div class="form-group col-md-6">
																								<label>GENERO</label>
																								<select class="form-control" name="cod_genero">
																												<?php	foreach	($generos	as	$each):	?>
																																<option value="<?php	echo	$each['cod_genero']	?>"<?php	if	($each['cod_genero']	==	$cod_genero)	{echo	'selected';}?>><?php	echo	$each['nombre']	?></option>
																												<?php	endforeach	?>					
																								</select>
																				</div>
																				<div class="form-group col-md-12">
																								<label>RESUMEN</label>
																								<textarea rows="5" class="form-control" name="resumen"	><?php	echo	$resumen;	?></textarea> 
																				</div>
																</div>
																
																<button type="submit" class="btn btn-primary" id="btn_add_client">Enviar</button>
												</form>		
								</div>
    </div>
				<hr>
				<div class="row">
											<div class="col-md-3">
																			<form method="post" action="<?php echo base_url(); ?>/index.php/artistas/listado/<?php	echo	$cod_pelicula	?>">
																							<button type="submit" class="btn btn-primary" id="btn_add_client" <?php	if	($cod_pelicula	==	0)	{echo	'disabled';}?>>Añadir Artista</button>
																				</form>	
												</div>
												<div class="col-md-3">
																				<form method="post" action="<?php echo base_url(); ?>/index.php/fotos/listado/<?php	echo	$cod_pelicula	?>">
																								<button type="submit" class="btn btn-primary" id="btn_add_client" <?php	if	($cod_pelicula	==	0)	{echo	'disabled';}?>>Añadir Imagenes</button>
																				</form>	
												</div>
																<div class="col-md-3">
																				<form method="post" action="<?php echo base_url(); ?>/index.php/videos/listado/<?php	echo	$cod_pelicula	?>">
																								<button type="submit" class="btn btn-primary" id="btn_add_client" <?php	if	($cod_pelicula	==	0)	{echo	'disabled';}?>>Añadir Video</button>
																				</form>	
																</div>
																	<div class="col-md-3">
																				<form method="post" action="<?php echo base_url(); ?>/index.php/promociones/listado/<?php	echo	$cod_pelicula	?>">
																								<button type="submit" class="btn btn-primary" id="btn_add_client" <?php	if	($cod_pelicula	==	0)	{echo	'disabled';}?>>Añadir Promoción</button>
																				</form>	
																</div>
						</div>
				<hr>
</div>
<?php	$this->load->view('includes/footer');	?>